﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            DriveInfo[] driveInfo = DriveInfo.GetDrives();
            foreach (DriveInfo d in driveInfo)
            {
                if (d.IsReady)
                {
                    Console.WriteLine("名称：" + d.Name);
                    Console.WriteLine("类型：" + d.DriveType);
                    Console.WriteLine("文件格式：" + d.DriveFormat);
                    Console.WriteLine("可用空间大小：" + d.TotalFreeSpace);
                    Console.WriteLine("总空间大小：" + d.TotalSize);
                    Console.WriteLine("卷标：" + d.VolumeLabel);
                    Console.WriteLine("根目录：" + d.RootDirectory);
                }
            }
        }
    }
}
